/*
* Accord Software, Inc.
*
* Tutorial 07
*
* Add numbers in the cube
*/
#include "cube.h"
/*
* build a cube structure
*/
static struct cube c3[] = {
/* n x y z */
{1, &c3[1], &c3[4], &c3[3]}, /* 0 */
{2, &c3[0], &c3[5], &c3[2]}, /* 1 */
{3, &c3[3], &c3[6], &c3[1]}, /* 2 */
{4, &c3[2], &c3[7], &c3[0]}, /* 3 */
{5, &c3[5], &c3[0], &c3[7]}, /* 4 */
{6, &c3[4], &c3[1], &c3[6]}, /* 5 */
{7, &c3[7], &c3[2], &c3[5]}, /* 6 */
{8, &c3[6], &c3[3], &c3[4]}, /* 7 */
};
main(argc, argv)
int argc;
char *argv[];
{
char *progname = argv[0];
int sum;
/*
* call ipf to add the cube's nodes
*/
sum = addcube(c3);
printf("%s sum = %d\n", progname, sum);
exit(0);
}